<!--
 (c) Copyright Ascensio System SIA 2020

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
<!DOCTYPE html>
<html lang="en">
    <head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>Edit action</title>

		<script type="text/javascript" src="../js/plugins.js"></script>
		<script type="text/javascript" src="../js/plugins-ui.js"></script>
		<script type="text/javascript" src="scripts/engine/providers/base.js"></script>
		<script type="text/javascript" src="components/Tooltip/script.js"></script>
		<script type="text/javascript" src="../js/plugin-stub.js"></script>
		<script src="vendor/jquery/jquery-3.7.1.min.js"></script>
		<script src="vendor/select2-4.0.6-rc.1/dist/js/select2.js"></script>		
		<link rel="stylesheet" href="../css/plugins.css">
		<link rel="stylesheet" href="vendor/select2-4.0.6-rc.1/dist/css/select2.css"/>
		<link rel="stylesheet" href="./resources/styles/common.css">
		<link rel="stylesheet" href="./resources/styles/aiModelEdit.css">
		<link rel="stylesheet" href="components/Tooltip/style.css">
    </head>
    <body class="noselect">
		<div class="section">
			<div class="form-vertical-item">
				<div class="section-label">
					<label class="d-flex-center">
						<span class="i18n">Model name</span>
						<span class="required-mark">*</span>
					</label>
				</div>
				<input id="name-input" type="text" class="form-control" maxlength="80"/>
			</div>
		</div>

		<div class="section">
			<div class="section-label" id="provider-section-label">
				<label class="i18n">Provider</label>
			</div>
			<div class="form-horizontal-item">
				<label class="d-flex-center">
					<span class="i18n">Name</span>
					<span class="required-mark">*</span>
				</label>
				<select id="provider-name-cmb" class="form-control"></select>
			</div>
			<div class="form-horizontal-item">
				<label class="d-flex-center">
					<span class="i18n">URL</span>
					<span class="required-mark">*</span>
				</label>
				<input id="provider-url-input" type="text" class="form-control"/>
			</div>
			<div class="form-horizontal-item">
				<label class="i18n">Key</label>
				<input id="provider-key-input" type="text" class="form-control"/>
			</div>
		</div>

		<div class="section">
			<div class="form-vertical-item">
				<div class="section-label">
					<label class="d-flex-center">
						<span class="i18n">Model</span>
						<span class="required-mark">*</span>
					</label>
					<div id="update-models-row">
						<div id="update-models-loader-container" class="asc-loader-container"></div>
						<button id="update-models-btn" class="action-btn i18n">Update models list</button>
						<img id="update-models-error" class="icon" src="resources/icons/light/error.png" style="display: none;"/>
					</div>
				</div>
				<select id="model-name-cmb" class="form-control"></select>
			</div>
		</div>

		<div class="section" style="margin-bottom: 0;">
			<div class="form-vertical-item">
				<div class="section-label">
					<label class="i18n">Use model for</label>
				</div>
			</div>
			<div class="form-horizontal-item" id="block-use-for" style="margin-bottom: 0;">
				<div id="use-for-text"></div>
				<div id="use-for-image"></div>
				<div id="use-for-embeddings"></div>
				<div id="use-for-audio"></div>
				<div id="use-for-moderations"></div>
				<div id="use-for-realtime"></div>
				<div id="use-for-code"></div>
				<div id="use-for-vision"></div>
			</div>
		</div>
		<div id="custom-providers-button">
			<label class="i18n">
				Custom providers
			</label>
		</div>
		<script type="text/javascript" src="scripts/aiModelEdit.js"></script>
    </body>
</html>
